<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // decode解码
        // encode编码
        const url = 'http://www.liulongbin.top:3006/api/news?name=' + encodeURIComponent('张三');

        console.log(url);

        const url1 = 'http://www.liulongbin.top:3006/api/news?name=%E5%BC%A0%E4%B8%89';

        console.log( decodeURIComponent(url1) );



    </script>
</body>
</html>